package com.lin.boot.controller.demo;

import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson2.JSON;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * @author: linjiang
 * @date: 2024/12/9
 */
@RestController
public class DemoController {

    @GetMapping("/demo1")
    public String demo() {
//        String url = "http://localhost:30118/toolkit-business/pub/toolkit/payment/callback/notify/icbc-pay";
//        HashMap<String, Object> body = new HashMap<>();
//        body.put("order_id", "123456");
//        body.put("out_trade_no", "102024120611060252");
//        body.put("return_code", "0");
//        String post = HttpUtil.post(url, JSON.toJSONString(body));
        return "success1";
    }

    @GetMapping("/demo2")
    public String demo2() {
//        String url = "http://localhost:30118/toolkit-business/pub/toolkit/payment/callback/notify/icbc-pay";
//        HashMap<String, Object> body = new HashMap<>();
//        body.put("order_id", "123456");
//        body.put("out_trade_no", "102024120611060252");
//        body.put("return_code", "0");
//        String post = HttpUtil.post(url, JSON.toJSONString(body));
        return "success1";
    }

}
